package com.template.mongo.persistence.entity;

import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import com.template.mongo.model.BaseBean;

import java.util.Date;


/**
 * The persistent class for the account database table.
 * 
 */
@Document(collection = "account")
public class Account extends BaseBean {
	private static final long serialVersionUID = 1L;

    @Indexed(unique = true)
    private String userName;

	private String country;

	private Date dayOfBirth;

	private Date dayReg;

	private String email;

	private String fullName;

	private boolean isActive;

	private int level;

	private String mobile;

	private String name;

	private String password;

	private String sex;

    public Account() {
    }

	public String getUserName() {
		return this.userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getCountry() {
		return this.country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public Date getDayOfBirth() {
		return this.dayOfBirth;
	}

	public void setDayOfBirth(Date dayOfBirth) {
		this.dayOfBirth = dayOfBirth;
	}

	public Date getDayReg() {
		return this.dayReg;
	}

	public void setDayReg(Date dayReg) {
		this.dayReg = dayReg;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getFullName() {
		return this.fullName;
	}

	public void setFullName(String fullName) {
		this.fullName = fullName;
	}

	public boolean getIsActive() {
		return this.isActive;
	}

	public void setIsActive(boolean isActive) {
		this.isActive = isActive;
	}

	public int getLevel() {
		return this.level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public String getMobile() {
		return this.mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getSex() {
		return this.sex;
	}

	public void setSex(String sex) {
		this.sex = sex;
	}

	@Override
	public String getKeyName() {
		return "userName";
	}

	@Override
	public Object getKeyValue() {
		return this.userName;
	}

	@Override
	public void setKeyValue(Object key) {
		this.userName = (String) key;
	}
}